import request from '@/utils/request'


// 获取特价活动列表
export function listBargain (query) {
    return request({
        url: '/store/promotion/bargain',
        method: 'get',
        params: query
    })
}
// 新增特价活动
export function addBargain (data) {
    return request({
        url: '/store/promotion/bargain',
        method: 'POST',
        data: data
    })
}
// 修改特价活动
export function updateBargain (id, data) {
    return request({
        url: '/store/promotion/bargain/' + id,
        method: 'put',
        data: data
    })
}
// 关闭 活动 
export function closeActivity (id) {
    return request({
        url: `/store/promotion/bargain/${id}/close`,
        method: 'delete',
    })
}
